home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / widget / nsIDragSessionGTK.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  4KB  |  85 lines

  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * ***** BEGIN LICENSE BLOCK *****
  4.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  5.  *
  6.  * The contents of this file are subject to the Mozilla Public License Version
  7.  * 1.1 (the "License"); you may not use this file except in compliance with
  8.  * the License. You may obtain a copy of the License at
  9.  * http://www.mozilla.org/MPL/
  10.  *
  11.  * Software distributed under the License is distributed on an "AS IS" basis,
  12.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  13.  * for the specific language governing rights and limitations under the
  14.  * License.
  15.  *
  16.  * The Original Code is mozilla.org code.
  17.  *
  18.  * The Initial Developer of the Original Code is
  19.  * Christopher Blizzard <blizzard@mozilla.org>.
  20.  * Portions created by the Initial Developer are Copyright (C) 1998
  21.  * the Initial Developer. All Rights Reserved.
  22.  *
  23.  * Contributor(s):
  24.  *   Christopher Blizzard <blizzard@mozilla.org>
  25.  *
  26.  * Alternatively, the contents of this file may be used under the terms of
  27.  * either the GNU General Public License Version 2 or later (the "GPL"), or
  28.  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  29.  * in which case the provisions of the GPL or the LGPL are applicable instead
  30.  * of those above. If you wish to allow use of your version of this file only
  31.  * under the terms of either the GPL or the LGPL, and not to allow others to
  32.  * use your version of this file under the terms of the MPL, indicate your
  33.  * decision by deleting the provisions above and replace them with the notice
  34.  * and other provisions required by the GPL or the LGPL. If you do not delete
  35.  * the provisions above, a recipient may use your version of this file under
  36.  * the terms of any one of the MPL, the GPL or the LGPL.
  37.  *
  38.  * ***** END LICENSE BLOCK ***** */
  39.  
  40. #ifndef nsIDragSessionGTK_h_
  41. #define nsIDragSessionGTK_h_
  42.  
  43. #include "nsISupports.h"
  44.  
  45. #include <gtk/gtk.h>
  46.  
  47. typedef void (*nsIDragSessionGTKTimeCB)(guint32 *aTime);
  48.  
  49. #define NS_IDRAGSESSIONGTK_IID \
  50. { 0xa6b49c42, 0x1dd1, 0x11b2, { 0xb2, 0xdf, 0xc1, 0xd6, 0x1d, 0x67, 0x45, 0xcf } };
  51.  
  52. class nsIDragSessionGTK : public nsISupports {
  53. public:
  54.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDRAGSESSIONGTK_IID)
  55.  
  56.   // Thse are all target methods - that is when the mozilla is a
  57.   // target of a drag.  Any methods related to when mozilla starts a
  58.   // drag are elsewhere.
  59.     
  60.   // this sets the last drag context used where mozilla is the target
  61.   // of a drag
  62.   NS_IMETHOD TargetSetLastContext  (GtkWidget      *aWidget,
  63.                                     GdkDragContext *aContext,
  64.                                     guint           aTime) = 0;
  65.   // this is called at the beginning of a drag motion event
  66.   NS_IMETHOD TargetStartDragMotion (void) = 0;
  67.   // this is called at the end of a drag motion event
  68.   NS_IMETHOD TargetEndDragMotion   (GtkWidget      *aWidget,
  69.                                     GdkDragContext *aContext,
  70.                                     guint           aTime) = 0;
  71.   // this is called when data is received after being sent above
  72.   NS_IMETHOD TargetDataReceived    (GtkWidget         *aWidget,
  73.                                     GdkDragContext    *aContext,
  74.                                     gint               aX,
  75.                                     gint               aY,
  76.                                     GtkSelectionData  *aSelection_data,
  77.                                     guint              aInfo,
  78.                                     guint32            aTime) = 0;
  79.   // this sets a callback for time related fun
  80.   NS_IMETHOD TargetSetTimeCallback (nsIDragSessionGTKTimeCB aCallback) = 0;
  81.  
  82. };
  83.  
  84. #endif /* nsIDragSessionGTK_h_ */
  85.